<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        .inner{
            width: 300px;
            height: 300px;
            margin: 0 auto;
            background-color: skyblue;
            position: relative;
        }
        .inner input{
            width: 100px;
            height: 100px;
            background-color: hotpink;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }
    </style>
</head>

<body>
    <!-- .stop：阻止冒泡 -->
    <!-- .prevent：阻止默认行为 -->
    <!-- .capture：实现捕获事件触发机制  事件从外向里执行；-->
    <!-- .self：实现只有点击当前元素的时候，才会触发事件处理函数-->
    <!-- .once：只触发一次事件处理函数 -->
    <div class="app">
        <div class="inner" @click.capture='hander'>
                <input type="button" value="戳她" @click='str'>
        </div>
    </div>

    <script src="./node_modules/_vue@2.5.22@vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el:'.app',
            data:{},
            methods:{
                hander(){
                    alert('雷憨憨，mua!!!')
                },
                str(){
                    alert('雷憨憨，欸嘿嘿')
                }
            }

        })
    </script>
</body>

</html>